﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using VideoSystem.Model;
using VideoSystem.Ctrl;
using VideoSystem;
using System.Collections.Generic;
using System.Linq;
namespace VideoSystemTest
{
    [TestClass]
    public class OptionCtrlTest
    {
        OptionCtrl optCtrl = new OptionCtrl();
        UserCtrl userCtrl = new UserCtrl();
        [TestMethod]
        public void GetOptionForId()
        {
            int episodeId = 1;
            Option option = optCtrl.GetOptionForId(episodeId);
            string option1 = option.Option1Text;
            Assert.AreEqual("Nissen spiser slik!", option1);
        }

        [TestMethod]
        public void getAllAppUsers()
        {
            List<User> allUsers = userCtrl.getAllAppUsers();
            User user = allUsers.ElementAt(0);
            Assert.AreEqual("APA91bFViPk90zeJc1fUXbGPCfeIDA_yEQy0fN0_UfoqLCZ22g_w_AfmxTCaNGFSIFsHeWOax8KaW6Pmm2R38eFR3lnaJa4pdArCo52ZpZvjEOW_-K_w_rG8_ESSQOuOC-bFB7LFEfuThvgo-hzln5is2bj9YXcXTA",user.userId);
        }
    }
}
